<template>
    <div class="xinwenxinxi-detail" v-loading="loading">
        <div>
<e-container>
            <div  style="margin:10px 0 0 0">
<e-module-model-box title="留言详情">

</e-module-model-box>

</div>    

</e-container>
</div>    </div>
</template>
<style type="text/scss" scoped lang="scss">
    </style>
<script>
    import api from '@/api';
    import { extend } from '@/utils/extend';
        export default {
        data() {
            return {
                loading:false,   // 加载
                map:{
                    xingming:'',
                    lianxidianhua:'',
                    liuyanneirong:'',
                    liuyanren:'',
                    huifuneirong:'',
                    addtime:'',
                },
            }
        },
                props:{
            id:{
                type:[String,Number],
                required:true
            }
        },
        watch: {
            id:{
                handler(){
                    this.loadDetail();
                },
                immediate:true
            },
                    },
        computed: {
                    },
        methods: {
            //后台获取信息
            loadDetail(){
                if(this.loading) return;
                this.loading = true;
                this.$get(api.comment_boards.detail , {//get请求获取信息
                    id:this.id//传送数据id
                }).then(res=>{//成功
                    this.loading = false;
                    if(res.code == api.code.OK){
                        extend(this,res.data);
                    }else{//数据不匹配
                        this.$message.error(res.msg);
                    }
                }).catch(err=>{//失败
                    this.loading = false;
                    this.$message.error(err.message);
                });
            },

                    },
        created() {
                    },
        mounted() {
                    },
        destroyed() {
                    }
    }
</script>
